@PACKAGE_INIT@

set(KAUTH_STUB_FILES_DIR "@PACKAGE_KDE_INSTALL_DATADIR_KF@/kauth/")

set(KAUTH_BACKEND_NAME "@KAUTH_BACKEND_NAME@")
set(KAUTH_HELPER_BACKEND_NAME "@KAUTH_HELPER_BACKEND_NAME@")
set(KAUTH_POLICY_FILES_INSTALL_DIR "@KAUTH_POLICY_FILES_INSTALL_DIR@")
set(KAUTH_HELPER_INSTALL_DIR "@KAUTH_HELPER_INSTALL_DIR@")
set(KAUTH_HELPER_INSTALL_ABSOLUTE_DIR "@KAUTH_HELPER_INSTALL_ABSOLUTE_DIR@")

include(CMakeFindDependencyMacro)

find_dependency(KF6CoreAddons "@KF_DEP_VERSION@")

if(NOT @BUILD_SHARED_LIBS@)
    if(NOT @KAUTH_BUILD_CODEGENERATOR_ONLY@)
        find_dependency(Qt6Gui "@REQUIRED_QT_VERSION@")
    endif()

    if(NOT KAUTH_BACKEND_NAME AND @UNIX@ AND NOT @APPLE@)
        find_dependency(PolkitQt6-1 "@POLKITQT_MIN_VERSION@")
        find_dependency(Qt6DBus "@REQUIRED_QT_VERSION@")
    endif()

    if(KAUTH_BACKEND_NAME AND NOT @KAUTH_BUILD_CODEGENERATOR_ONLY@ AND "${KAUTH_BACKEND_NAME}" STREQUAL "POLKITQT6-1")
        find_dependency(PolkitQt6-1 "@POLKITQT_MIN_VERSION@")
        find_dependency(Qt6DBus "@REQUIRED_QT_VERSION@")
    endif()
endif()

include("${CMAKE_CURRENT_LIST_DIR}/KF6AuthTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
include("${CMAKE_CURRENT_LIST_DIR}/KF6AuthMacros.cmake")

if(NOT "${KAUTH_BACKEND_NAME}" STREQUAL "FAKE")
    if(CMAKE_CROSSCOMPILING AND KF6_HOST_TOOLING)
        find_file(KAUTH_TARGETSFILE KF6Auth/KF6AuthToolsTargets.cmake PATHS ${KF6_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
        include("${KAUTH_TARGETSFILE}")
    else()
        include("${CMAKE_CURRENT_LIST_DIR}/KF6AuthToolsTargets.cmake")
    endif()
endif()
